#ifndef EXAMPLESERVICE_H
#define EXAMPLESERVICE_H

#include "exampleadaptor.h"

class ExampleService : public com::uniontech::dbus::ExampleAdaptor
    , public ut::IntrospectableAdaptor
    , public ut::ObjectAdaptor
    , public ut::PropertiesAdaptor
{
public:
    explicit ExampleService(ut::Connection &conn, const ut::Path &path);

    int32_t Random() override;

    std::string Hello(const std::string &name) override;

    ut::Variant Echo(const ut::Variant &input) override;

    std::vector<uint8_t> Cat(const std::string &file) override;

    int32_t Sum(const std::vector<int32_t> &ints) override;

    std::map<std::string, std::string> Info() override;

    void Exit() override;

    // 设置属性时触发此回调
    void on_set_property(InterfaceAdaptor &interface, const std::string &prop, const ut::Variant &value) override;
};

#endif // EXAMPLESERVICE_H
